public class demo {

   /* void func(int n){//f(n) = n*n+2*n+10--->O(n)=n*n
        int count =0;
        for (int i = 0; i <n ; i++) {
            for (int j = 0; j < n; j++) {
                count++;
            }
        }
        for (int k = 0; k < 2*n; k++) {
            count++;
        }
        int m =10;
        while ((m--)>0){
            count++;
        }
    }*/

    long factorial(int n){//计算阶乘递归factorial的时间复杂度
        return n<2?n:factorial(n-1)*n;
    }
}
